package ComparatorAndComparable.lambdaDemo;

public class LambdaDemo {
    public static void main(String[] args) {
//        MyRunnable my = new MyRunnable();
//        Thread t1 = new Thread(my);
//        t1.start();
//        Thread t2 = new Thread(my);
//        t2.start();

//        Thread t1 = new MyThread();
//        t1.start();
//        Thread t2 = new MyThread();
//        t2.start();

//        new Thread(new Runnable() {
//            @Override
//            public void run() {
//                Thread thread = Thread.currentThread();
//                System.out.println("Runnable多线程程序" + thread.getName() + "启动了");
//            }
//        }).start();

        new Thread( () -> {
            Thread thread = Thread.currentThread();
                System.out.println("lambda多线程程序" + thread.getName() + "启动了");
        }).start();
    }
}
